package mobi.hami.huapin.service.impl;

import mobi.hami.huapin.dao.SkuAffiliatedinfoMapper;
import mobi.hami.huapin.model.SkuAffiliatedinfo;
import mobi.hami.huapin.service.SkuAffiliatedinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SkuAffiliatedinfoServiceImpl implements SkuAffiliatedinfoService {
    @Autowired
    private SkuAffiliatedinfoMapper skuAffiliatedinfoMapper;
    @Override
    public int add(SkuAffiliatedinfo skuAffiliatedinfo) {
        return skuAffiliatedinfoMapper.insert(skuAffiliatedinfo);

    }
    @Override
    public   SkuAffiliatedinfo selectAffiliatedinfo(int skuid)
    {
        return skuAffiliatedinfoMapper.selectAffiliatedinfo(skuid);

    }

    /*
     * 判断sku是否存在基本信息
     * */
  public   SkuAffiliatedinfo  isInfo(int skuid){
        return skuAffiliatedinfoMapper.isInfo( skuid);
    }
    public int   Update(SkuAffiliatedinfo skuAffiliatedinfo){
        return skuAffiliatedinfoMapper.updateByPrimaryKeySelective(skuAffiliatedinfo);
    }
}
